<template>
  <div class="about">
    <!-- <h1>这是我的About页面</h1> -->
<van-tree-select height="100%" :items="items" :main-active-index.sync="active">
  <template #content>
<Aboutwj :Aboutwjlset='categorylisets' :actives='active'></Aboutwj>
  </template>
</van-tree-select>
  </div>
</template>
<script>
import {getAbout} from '../lib/about'
import Aboutwj from "../components/Abouttext/Aboutwj";
export default 
{
  data() {
    return {
      categorylisets: [],
      active: 0,
      items:[]
    };
  },

    mounted() {
    getAbout().then((res) => {
      console.log(res);
      if (res.msg === "ok") {
        res.data.forEach(element => {
          this.items.push({text:element.name});
        });
        this.categorylisets = res.data;
      } else {
        console.log('错误')
      }
    });
  },
  components: {
    Aboutwj
  }
}
</script>
